]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
altTab: fix incorrect positioning with multiple monitors
authorMaxim Ermilov <zaspire@rambler.ru>
Tue, 8 Mar 2011 17:15:20 +0000 (20:15 +0300)
committerMaxim Ermilov <zaspire@rambler.ru>
Tue, 8 Mar 2011 17:21:07 +0000 (20:21 +0300)
Calculate the position of the alt-tab popup correctly when primary.x != 0.
This was accidentally broken by 614176b2691981c982e77b8a04b01ff02a670857
https://bugzilla.gnome.org/show_bug.cgi?id=644206

js/ui/altTab.js

index 44fd39d1d74e8c7aabd8f8f7d3ad4d7bc85d95b7..46ab9a325444d79ab3a2da4f48c4436400411d82 100644 (file)
@@ -87,7 +87,7 @@ AltTabPopup.prototype = {
         let [childMinHeight, childNaturalHeight] = this._appSwitcher.actor.get_preferred_height(primary.width - hPadding);
         let [childMinWidth, childNaturalWidth] = this._appSwitcher.actor.get_preferred_width(childNaturalHeight);
         childBox.x1 = Math.max(primary.x + leftPadding, primary.x + Math.floor((primary.width - childNaturalWidth) / 2));
-        childBox.x2 = Math.min(primary.width - hPadding, childBox.x1 + childNaturalWidth);
+        childBox.x2 = Math.min(primary.x + primary.width - hPadding, childBox.x1 + childNaturalWidth);
         childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2);
         childBox.y2 = childBox.y1 + childNaturalHeight;
         this._appSwitcher.actor.allocate(childBox, flags);